package Test;

import org.junit.Assert;
import org.junit.Test;

import XML.XMLHelper;

import Command.Select;

public class TestSelect {
	
	@Test
	public void testExecuteQuery()
	{
		// Test Case 1
		Select selectCmd = new Select("");
		selectCmd.setDbName("DB_Test");
		selectCmd.setSql("select * from nhanvien where MaNV >= 328");		
		Object executeRet = selectCmd.executeQuery();
		int actual1 = 0;
		if(executeRet != null && !(executeRet instanceof String))
		{
			Object[] temp = (Object[]) executeRet;
			Object[][] data = (Object[][]) temp[1];
			actual1 = data.length;
		}
		Assert.assertEquals("TC 1", 4, actual1);
		
		// Test Case 2
	}
}
